package _spring_test._tests;

import _spring_test.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author: huangya
 * @Date: 2019/8/19
 * @Description:
 */
public class LookupMethodTest {

    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("application-lookup-method.xml");
//        User user2 = (User) ac.getBean("user2");
//        System.out.println(user2.getDepartment());
//
//        User user22 = (User) ac.getBean("user2");
//        System.out.println(user22.getDepartment());


        /** lookup-method start */
//        User user3 = (User) ac.getBean("user3");
//        System.out.println(user3.getDepartment());

        User user33 = (User) ac.getBean("user3");
        System.out.println(user33.getDepartment());
        /** lookup-method end */
    }

}
